﻿using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace Converter
{
    public class TreeItemContainerStyleSelector : StyleSelector
    {
        public override Style SelectStyle(object item, DependencyObject container)
        {
            FrameworkElement frameworkElement = container as FrameworkElement;

            if (item is TreeNodeData<PtOrgInfo>)
            {
                return frameworkElement.FindResource("orgItemStyle") as Style;
            }
            else
            {
                return frameworkElement.FindResource("cameraItemStyle") as Style;
            }
        }
    }
}
